<template>
  <div id="NumRuleCon">
    <!-- <myForms :data="NumRuleFormList" :span="12"></myForms> -->

    <el-form label-position="top" label-width="120px" size="small">
      <el-row :gutter="20">
        <el-col :span="8">
          <el-form-item label="账簿编码">
            <el-input v-model="NumRuleFormVal.bookCode"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="分隔符">
            <el-select
              v-model="NumRuleFormVal.isNeedSeparator1"
              placeholder="请选择分隔符"
            >
              <el-option label="-" value="1"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="自定义要素">
            <el-select
              v-model="NumRuleFormVal.eleName"
              placeholder="请选择自定义要素"
            >
              <el-option
                v-for="item in SelfEleList"
                :key="item.dataId"
                :label="item.eleName"
                :value="item.dataId"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="分隔符">
            <el-select
              v-model="NumRuleFormVal.isNeedSeparator2"
              placeholder="请选择分隔符"
            >
              <el-option label="-" value="1"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="流水号长度(5-9)">
            <el-input
              v-model="NumRuleFormVal.casNoLength"
              type="age"
              autocomplete="off"
            ></el-input>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>

<script>
// import myForms from "@/components/ui/form/form.vue";
let NumRuleFormListData = [
  {
    guid: "guids11",
    key: "/uac/system/userset",
    tablecode: "fasp_t_causer",
    type: "text",
    name: "账簿编码：",
    columncode: "code",
    isvisiable: 1,
    requirement: 0,
    defaultvalue: null,
    colspannum: null,
    ordernum: 10,
    appid: "uac",
    isedit: 1,
    config: null,
  },
  {
    guid: "guids131",
    key: "/uac/system/userset",
    tablecode: "fasp_t_causer",
    type: "select",
    name: "分隔符：",
    columncode: "name",
    isvisiable: 1,
    requirement: 0,
    defaultvalue: null,
    colspannum: null,
    ordernum: 11,
    appid: "uac",
    isedit: 1,
    config: null,
  },
  {
    guid: "guids2",
    key: "/uac/system/userset",
    tablecode: "fasp_t_causer",
    type: "select",
    name: "自定义要素：",
    columncode: "name",
    isvisiable: 1,
    requirement: 0,
    defaultvalue: null,
    colspannum: null,
    ordernum: 20,
    appid: "uac",
    isedit: 1,
    config: null,
  },
  {
    guid: "guids3",
    key: "/uac/system/userset",
    tablecode: "fasp_t_causer",
    type: "select",
    name: "分隔符：",
    columncode: "num",
    isvisiable: 1,
    requirement: 0,
    defaultvalue: null,
    colspannum: null,
    ordernum: 30,
    appid: "uac",
    isedit: 1,
    config: null,
  },
  {
    guid: "guids4",
    key: "/uac/system/userset",
    tablecode: "fasp_t_causer",
    type: "text",
    name: "流水号长度(5-9)：",
    columncode: "name",
    isvisiable: 1,
    requirement: 0,
    defaultvalue: null,
    colspannum: null,
    ordernum: 40,
    appid: "uac",
    isedit: 1,
    config: null,
  },
];
let NumRuleFormValData = {
  bookCode: "",
  eleName: "",
  isNeedSeparator1: "",
  isNeedSeparator2: "",
  casNoLength: "",
};
let SelfEleData = [{ eleName: "自定义要素1", dataId: "1" }];
export default {
  name: "NumRule",
  props: {
    CurrBookObj: {
      type: Object,
      default: function () {
        return {};
      },
    },
  },
  data() {
    return {
      NumRuleFormList: NumRuleFormListData,
      NumRuleFormVal: NumRuleFormValData,
      SelfEleList: SelfEleData,
    };
  },
  components: {
    // myForms
  },
  created() {},
  mounted() {
    this.NumRuleFormVal = this.CurrBookObj.casBookCodeRulesPO
      ? this.CurrBookObj.casBookCodeRulesPO
      : NumRuleFormValData;
    // this.SelfEleList = this.CurrBookObj.casElementPOs?this.CurrBookObj.casElementPOs:[];
  },
  methods: {},
};
</script>

<style lang="less">
#NumRuleCon .el-select {
  width: 100%;
}
#NumRuleCon {
  .el-form-item__label {
    padding-bottom: 0px !important;
  }
  .el-form-item {
    margin-bottom: 10px !important;
  }
}
</style>
